package com.yjhb.android.sbz.enums;

/**
 * 创建者 zx
 * 创建时间 2020/12/24 15:35
 */
public enum ReportState {
    REPORT_STATE_UNKNOWN(-99, "未知状态"),
    REPORT_STATE_WAIT_PLEA(1, "等待辩诉"),
    REPORT_STATE_WAIT_TRIAL(2, "等待判决"),
    REPORT_STATE_PLAINTIFF_WIN(3, "原告胜利"),
    REPORT_STATE_DEFENDANT_WIN(4, "被告胜利"),
    REPORT_STATE_PLAINTIFF_CANCEL(5, "举报已撤销"),
    REPORT_STATE_AUTO_PASS(6, "被告未辩诉，原告胜利"),
    REPORT_STATE_OFFICIAL(7, "官方已介入，感谢支持");


    ReportState(int state, String stateStr) {
        this.stateStr = stateStr;
        this.state = state;
    }

    private int state;
    private String stateStr;

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateStr() {
        return stateStr;
    }

    public void setStateStr(String stateStr) {
        this.stateStr = stateStr;
    }

    public static ReportState getState(int state) {
        switch (state) {
            case 1:
                return REPORT_STATE_WAIT_PLEA;
            case 2:
                return REPORT_STATE_WAIT_TRIAL;
            case 3:
                return REPORT_STATE_PLAINTIFF_WIN;
            case 4:
                return REPORT_STATE_DEFENDANT_WIN;
            case 5:
                return REPORT_STATE_PLAINTIFF_CANCEL;
            case 6:
                return REPORT_STATE_AUTO_PASS;
            case 7:
                return REPORT_STATE_OFFICIAL;
            default:
                return REPORT_STATE_UNKNOWN;
        }
    }
}
